﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using MC.RideEvent.Mvc.Models.Entity;
using MC.RideEvent.Mvc.Models.ViewModel;

namespace MC.RideEvent.Mvc.Controllers
{
    public class ControllerBase : Controller
    {
        protected const string ACTION_FORM_EDIT = "edit";
        protected const string ACTION_FORM_CREATE = "create";

        protected string CurrentMemberId
        {
            get { return Session["CurrentMemberId"] as string; }
            set { Session["CurrentMemberId"] = value; }
        }

        protected MemberViewModel CurrentMember
        {
            get { return Session["CurrentMember"] as MemberViewModel; }
            set { Session["CurrentMember"] = value; }
        }

        protected void ClearUserSession()
        {
            Session.Clear();
        }
    }
}